package com.study.demo01;

/**
 * Proxy class
 *
 * @author chenyeqing
 * @date 2021/1/13
 */
public class Proxy implements Rent {
    private Host host;

    public Proxy() {
    }

    public Proxy(Host host) {
        this.host = host;
    }

    public void rent() {
        seeHoust();
        host.rent();
        signContract();
        fare();
    }

    public void seeHoust() {
        System.out.println("中介带你看房子");
    }

    public void signContract() {
        System.out.println("签租赁合同");
    }

    public void fare() {
        System.out.println("收中介费");
    }

}
